SpatialStream® Code Examples

Adding a WMS Layer

Creating a Map Layer Object and adding it to the map is the SpatialStream® recommended method.
The example below shows how to construct a Map Layer Object using the BaseDynamicLayer.createSubclass to add a Parcel layer (WMS) to the map.
The BaseDynamicLayer.createSubclass constructs the GetMap requests which retrieve the images for overlaying on the map.

GetMap

wmsLayer = new DmpWMSLayer({

mapParameters: {

layers: "samplesite.dmp/Parcels",
sld: "samplesite.dmp.Styles.Parcels/Default.sld.xml",
showField: null,
showVaules: null,
minScale: LOD[13].scale,
maxScale: LOD[20].scale,
},
});

map.add(wmsLayer);


Run Sample   Back To Index